<template>
	<view class="model">
		<!-- <image src="../../static/bill-lc.png" mode=""></image> -->
		<image src="../../static/bill-tx.png" mode="" v-if="data.reason == 'withdrawal'"></image>
		<image src="../../static/bill-cz.png" mode="" v-if="data.reason == 'recharge'"></image>
		<image src="../../static/bill-zz.png" mode="" v-if="data.reason == 'transfer'"></image>
		<image src="../../static/bill-zz.png" mode="" v-if="data.reason == 'receive_transfer'"></image>
		<image src="../../static/icon_sxf.png" mode="" v-if="data.reason == 'commission'"></image>
		<image src="../../static/bill-sy.png" mode="" v-if="data.reason == 'investEarnings'"></image>
		<image src="../../static/bill-lc.png" mode="" v-if="data.reason == 'invest'"></image>
		<image src="../../static/icon_bjth.png" mode="" v-if="data.reason == 'invest_back'"></image>
		<text class="title">{{data.note}}</text>
		<text :class="data.changeAmount>0?'active amoubt':'amoubt'">{{data.changeAmount>0?'+':''}}{{data.changeAmount}}U</text>
		<view class="list">
			<view class="item" v-if="data.reason == 'recharge'||data.reason == 'withdrawal'">
				<text class="label">订单状态</text>
				<text class="value" v-if="data.status=='applying'">申请中</text>
				<text class="value" v-if="data.status=='approved'">审核通过</text>
				<text class="value" v-if="data.status=='reject'">审核驳回</text>
				
			</view>
			
			<view class="item" v-if="data.reason != 'recharge'&&data.reason != 'withdrawal'">
				<text class="label">订单状态</text>
				<text class="value">已成功</text>
			
				
			</view>
			<view class="item">
				<text class="label">订单时间</text>
				<text class="value">{{data.changeTime}}</text>
			</view>
			
			<view class="item">
				<text class="label">订单编号</text>
				<text class="value">{{data.orderNo}}</text>
			</view>
			<view class="item">
				<text class="label">订单类型</text>
				<text class="value" v-if="data.reason == 'withdrawal'">提现</text>
				<text class="value" v-if="data.reason == 'recharge'">充值</text>
				<text class="value" v-if="data.reason == 'transfer'">转账</text>
				<text class="value" v-if="data.reason == 'commission'">手续费</text>
				<text class="value" v-if="data.reason == 'investEarnings'">收益</text>
				<text class="value" v-if="data.reason == 'invest'">理财</text>
				<text class="value" v-if="data.reason == 'invest_earnings'">投资返利</text>
				<text class="value" v-if="data.reason == 'receive_transfer'">收到转账</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app'
import { ref } from 'vue';
	const data = ref()
	onLoad((params) => {
		
		data.value = JSON.parse(params.item)
	})
</script>

<style lang="scss">
	.model{
		margin: 80rpx 38rpx 38rpx;
		padding: 38rpx;
		background: #FFFFFF;
		border-radius: 23rpx;
		position: relative;
		.list{
			margin: 92rpx auto 0;
			border-top: 1rpx solid #f6f6f6;
			.item{
				display: flex;
				margin: 38rpx 0;
				.label{
					color: #999;
					font-size: 28rpx;
					margin-right: 38rpx;
				}
				.value{
					color: #313646;
					font-size: 28rpx;
					font-weight: bold;
				}
			}
		}
		image{
			display: block;
			width: 80rpx;
			height: 80rpx;
			
			position: absolute;
			top: -40rpx;
			left: 50%;
			margin-left: -40rpx;
		}
		.title{
			display: block;
			color: #313646;
			font-size: 28rpx;
			text-align: center;
			margin-top: 30rpx;
		}
		.amoubt{
			margin-top: 38rpx;
			display: block;
			text-align: center;
			color: #313646;
			font-size: 58rpx;
			font-weight: bold;
		}
		.active {
			color: #FF984D;
		}
	}
	page {
		background: #F6F7F9;
	}
</style>
